Repository navigation
fix(metadata): the store declares its views where it builds them, and a not-held refusal names each holder once - #33174
Conversation
…ch holder once in the not-held refusal Pin the loose ends of the per-member registry keys: the watcher event a second locale announces, the members a package's take-over leaves to the environment, and the fallback host's action doors (two packages on one object; MCP list_actions and bare run_action). Claude-Session: https://claude.ai/code/session_01L9qibvVVqBGyinb2xpNdvB Co-authored-by: Claude <noreply@anthropic.com>
… to one object as measured Claude-Session: https://claude.ai/code/session_01L9qibvVVqBGyinb2xpNdvB Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check8 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 16 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 61716eea4b67fe51ff7ab8b98a405e48e48c4fb2 && git checkout 61716eea4b67fe51ff7ab8b98a405e48e48c4fb2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5e250a65992192bdc9b3fb3be304a2fca245b2d1 d2fb8a8aeac4af3ddb9f918f0b70841f0f0ecd18 && git checkout -B drift-repro 5e250a65992192bdc9b3fb3be304a2fca245b2d1 && git merge --no-ff d2fb8a8aeac4af3ddb9f918f0b70841f0f0ecd18
node scripts/docs-audit/affected-docs.mjs --json 5e250a65992192bdc9b3fb3be304a2fca245b2d1 |
|
epic:#32897#1 · os-tesla · session_01L9qibzoApSyVPuia3NCrBY 维护者速读 · PR #33174 @
|
Requested by Tesla · project thread
Fixes #32714
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/metadata/src/package-slotted-store.tslatestMemberOfused to treat a store with no recorded write order as a view, and answer the slot's first member. A view now carries an explicit mark:newSlotView()builds one, andinheritStoreWriteOrdermarks the view it fills. The two places that build views (slotStoreOfhere,slotViewOfinmetadata-manager.ts) use it. A store that is not a view, with no write recorded, now answers by its write order, the waylastWrittenKeyOfdoes, instead of being read as a view.refuseSlotNotHeldnames each holder once (nit). Its candidates are deduplicated by holder. One package's two locales, or one package's action bound to two objects, is one candidate, which matches howpackageSlotsOfandrefuseSeveralSlotscount slots.packages/metadata/src/metadata-manager.ts:slotViewOfbuilds its view withnewSlotView().No public export changes. Only
PACKAGE_SLOTTED_STORE_TYPESleaves the module, and it is unchanged.Pins (no behaviour change)
added. This is decided by governing text, not by choice:email-template.zod.tscallslocale"the second half of the bundle key", so (name, locale) is the item's identity. The header ofitem-key-discriminators.tsin metadata-core says the same.register()splits "first registration vs overwrite".added, added, changed, changed; service events areregistered, registered, updated, updated. The environment's own bundle behaves the same way, and anagentcontrol is included.email_templateis not in the spec's closedMetadataEventType, so nothing is published to realtime.fr-FRstays bare until that package writesfr-FRtoo.MemoryLoader, andDatabaseLoader's rows ([[null,'fr-FR'],[A,null]]).protocolmerged listing).RESOURCE_NOT_FOUNDand no row (see Acceptance notes).RESOURCE_CONFLICTnaming both packages, and nothing runs.list_actions: one row per package.run_action: the D3 refusal (409RESOURCE_CONFLICT, both packages named), and nothing runs.metadata-manager-match-endpoint.test.tsis retitled so it names the epic ruling it follows (record 6818307202 on metadata: the in-memory registry and the artifact door's MemoryLoader keep one member per (package, name), so a bundled type's second locale is lost on the metadata service's own reads (N9) #32517: an unscoped plural read answers every package's slot).package-slotted-store.test.ts, which pins the rules over plain maps.Verification
All runs were on HEAD
d2fb8a8a(merge oforigin/mainat58443466a), throughscripts/pm/os-verify-lock.sh, on a shared box.@objectstack/metadata, full suite: 77/77 files, 2314 tests passed.@objectstack/runtimeaction-activation-unpackaged.test.ts: 21/21 passed.pnpm lint: exit 0.dispatch-gates.mjs --commands, each run with</dev/null, exit codes on disk, reconciled with--ran): 65 derived, 63 run and passed, 0 not run, 2 NOT MEASURED. Both of those exited 3 because a prerequisite was missing:node scripts/check-plugin-teardown-shape.mjs --self-testneeds a full clone, and this checkout is shallow.pnpm check:dual-build-cjs-loadsneeds every package's dist, and 41 packages have none here.ablation-replace.mjs:latestMemberOfinfers a view from a missing write order againnewSlotViewno longer marks its viewrefuseSlotNotHeldlists one candidate per memberregister()reports a new locale aschangedpluralEntryKeysputs every package on one key (metadata dist rebuilt, preflight confirmed the marker present, then--absentafter restore)list_actions, MCPrun_action)Acceptance notes
runGovernanceInventory, which readsloadManyKeyed('action')when the service offers it andloadMany('action')otherwise, so it sees every package's slot either way.POST /actions/_activation/crm_contact/shared_pinganswers 404 "has no declaration" rather than a 409 naming both packages. This is the same defect family as runtime: the action activation door drops the declaration's ambiguity refusal, so two packages' same-named global action answers 404 'has no declaration' instead of 409 naming the holders (ADR-0150) #32689 (activation 404 → 409), so it is pinned as measured, with a comment pointing to runtime: the action activation door drops the declaration's ambiguity refusal, so two packages' same-named global action answers 404 'has no declaration' instead of 409 naming the holders (ADR-0150) #32689.actions.tsis outside this card. It is not a widening: no row is written, and nothing runs.origin/mainmoved after my merge. It moved byf5121e84(fix(i18n): the Connect page says an AI assistant connected with an API key cannot build apps #33160, i18n) and5e250a65(feat(storage,mcp): one upload link takes several files on a multi-file field #33151, upload links inmcp.ts). Neither touches this diff's files, so per the brief I did not merge again.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibvVVqBGyinb2xpNdvB
Generated by Claude Code